home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / gnome-games-common.postinst < prev    next >
Text File  |  2009-09-22  |  3KB  |  138 lines

  1. #! /bin/sh
  2.  
  3. set -e
  4.  
  5. if [ "$1" = "configure" ] ; then
  6.  
  7. # gnome-games scores files get root:games
  8.  
  9. SCORE_FILES=" \
  10. glines.Small.scores \
  11. glines.Medium.scores \
  12. glines.Large.scores \
  13. gnibbles.1.0.scores \
  14. gnibbles.1.1.scores \
  15. gnibbles.2.0.scores \
  16. gnibbles.2.1.scores \
  17. gnibbles.3.0.scores \
  18. gnibbles.3.1.scores \
  19. gnibbles.4.0.scores \
  20. gnibbles.4.1.scores \
  21. gnobots2.classic_robots-safe.scores \
  22. gnobots2.classic_robots.scores \
  23. gnobots2.classic_robots-super-safe.scores \
  24. gnobots2.nightmare-safe.scores \
  25. gnobots2.nightmare.scores \
  26. gnobots2.nightmare-super-safe.scores \
  27. gnobots2.robots2_easy-safe.scores \
  28. gnobots2.robots2_easy.scores \
  29. gnobots2.robots2_easy-super-safe.scores \
  30. gnobots2.robots2-safe.scores \
  31. gnobots2.robots2.scores \
  32. gnobots2.robots2-super-safe.scores \
  33. gnobots2.robots_with_safe_teleport-safe.scores \
  34. gnobots2.robots_with_safe_teleport.scores \
  35. gnobots2.robots_with_safe_teleport-super-safe.scores \
  36. gnometris.scores \
  37. gnomine.Custom.scores \
  38. gnomine.Large.scores \
  39. gnomine.Medium.scores \
  40. gnomine.Small.scores \
  41. gnotravex.2x2.scores \
  42. gnotravex.3x3.scores \
  43. gnotravex.4x4.scores \
  44. gnotravex.5x5.scores \
  45. gnotravex.6x6.scores \
  46. gnotski.1.scores \
  47. gnotski.2.scores \
  48. gnotski.3.scores \
  49. gnotski.4.scores \
  50. gnotski.5.scores \
  51. gnotski.6.scores \
  52. gnotski.7.scores \
  53. gnotski.8.scores \
  54. gnotski.9.scores \
  55. gnotski.10.scores \
  56. gnotski.11.scores \
  57. gnotski.12.scores \
  58. gnotski.13.scores \
  59. gnotski.14.scores \
  60. gnotski.15.scores \
  61. gnotski.16.scores \
  62. gnotski.17.scores \
  63. gnotski.18.scores \
  64. gnotski.19.scores \
  65. gnotski.20.scores \
  66. gnotski.21.scores \
  67. gnotski.22.scores \
  68. gnotski.23.scores \
  69. gnotski.24.scores \
  70. gnotski.25.scores \
  71. gnotski.26.scores \
  72. gnotski.27.scores \
  73. gnotski.28.scores \
  74. gnotski.29.scores \
  75. gnotski.30.scores \
  76. gnotski.31.scores \
  77. gnotski.32.scores \
  78. gnotski.33.scores \
  79. gnotski.34.scores \
  80. gnotski.35.scores \
  81. gnotski.36.scores \
  82. gnotski.37.scores \
  83. gtali.Colors.scores \
  84. gtali.Regular.scores \
  85. mahjongg.bridges.scores \
  86. mahjongg.cloud.scores \
  87. mahjongg.confounding.scores \
  88. mahjongg.difficult.scores \
  89. mahjongg.dragon.scores \
  90. mahjongg.easy.scores \
  91. mahjongg.pyramid.scores \
  92. mahjongg.tictactoe.scores \
  93. mahjongg.ziggurat.scores \
  94. same-gnome.Large.scores \
  95. same-gnome.Medium.scores \
  96. same-gnome.Small.scores"
  97.  
  98. if [ ! -d /var/games ]; then
  99.     mkdir /var/games
  100. fi
  101.  
  102. for GAME in glines same-gnome; do
  103.     if [ -f /var/games/$GAME.scores ] && [ ! -e /var/games/$GAME.Small.scores ]; then
  104.     mv -f /var/games/$GAME.scores /var/games/$GAME.Small.scores
  105.     fi
  106. done
  107.  
  108. if [ -f /var/games/gtali.scores ] && [ ! -e /var/games/gtali.Regular.scores ]; then
  109.     mv -f /var/games/gtali.scores /var/games/gtali.Regular.scores
  110. fi
  111.  
  112. for FILES in $SCORE_FILES; do
  113.  
  114.     if [ -e /var/games/$FILES ]; then
  115.         continue
  116.     fi
  117.  
  118.     touch /var/games/$FILES
  119.     chown root:games /var/games/$FILES
  120.     chmod 664 /var/games/$FILES
  121. done
  122.  
  123. OLDDIR=/usr/lib/python2.4/site-packages/gnome_sudoku
  124. # Work around horrible bug of the initial gnome-sudoku package
  125. for dir in $OLDDIR/gtk_goodies $OLDDIR; do
  126.     if [ -d $dir ]; then
  127.         rm -f $dir/*.pyc $dir/*.pyo
  128.         rmdir --ignore-fail-on-non-empty $dir
  129.     fi
  130. done
  131. if [ -d $OLDDIR ]; then
  132.     echo "Warning: $OLDDIR is not empty and could not be cleaned up."
  133. fi
  134.  
  135. fi
  136.  
  137.  
  138.